package com.fqy.thread.lock;

import java.util.concurrent.TimeUnit;

/**
 * User: fqy
 * Date: 2021/8/31
 * Time: 15:55
 * Describe:
 */
public class Phone {

    public static synchronized void sendEmail() throws Exception {
        //Thread.sleep(4000);
        TimeUnit.SECONDS.sleep(4);
        System.out.println("____Emial");
    }

    public synchronized void sendMsg() throws Exception{
        System.out.println("____SMS");
    }

    public void phone(){
        System.out.println("____Phone");
    }
}
